Skip to content

Conversation

@crliao
Copy link
Contributor

@crliao crliao commented Dec 16, 2025

Summary

  • Allow instance config population during auto registration to Helix
  • Allow data node config population to property store during server startup

Testing Done

  • UT

// Pattern to match df -h output lines for Ambry mount points
// Example: /dev/sdh1 21T 14T 6.5T 68% /mnt/u001/ambrydata
private static final Pattern DF_PATTERN = Pattern.compile(
"^(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\d+)%\\s+(/mnt/u\\d+/ambrydata)$");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this pattern configurable too?

Comment on lines 151 to 155
/**
* Collect disk information by running 'df -h' command.
* @return map of mount point to DiskInfo
*/
public static Map<String, DiskInfo> collectDiskInfo() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should use some library like OSHI instead of running df -h

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey yes and would be cleaner, but i guess we can keep it simple for the time being? these info will be available in the metadata file very soon

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 12.50000% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.82%. Comparing base (52ba813) to head (3ffc877).
⚠️ Report is 335 commits behind head on master.

Files with missing lines Patch % Lines
...va/com/github/ambry/clustermap/DataNodeConfig.java 0.00% 12 Missing ⚠️
...ub/ambry/clustermap/HelixClusterAgentsFactory.java 0.00% 3 Missing ⚠️
.../com/github/ambry/clustermap/HelixParticipant.java 0.00% 3 Missing ⚠️
...y/clustermap/RecoveryTestClusterAgentsFactory.java 0.00% 1 Missing ⚠️
...b/ambry/clustermap/StaticClusterAgentsFactory.java 0.00% 1 Missing ⚠️
...main/java/com/github/ambry/server/AmbryServer.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3188      +/-   ##
============================================
+ Coverage     64.24%   69.82%   +5.57%     
- Complexity    10398    12809    +2411     
============================================
  Files           840      930      +90     
  Lines         71755    79054    +7299     
  Branches       8611     9455     +844     
============================================
+ Hits          46099    55197    +9098     
+ Misses        23004    20916    -2088     
- Partials       2652     2941     +289     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@crliao crliao merged commit df4c21a into linkedin:master Jan 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants